package com.hl.service;

import com.hl.mapper.WodehuidaMapper;
import com.hl.pojo.Answers;
import com.hl.pojo.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class WodehuidaServiceImpl implements WodehuidaService {
    @Autowired
    private WodehuidaMapper wodehuidaMapper;
    @Override
    public List<Answers> getAnswers(Integer id) {
        return wodehuidaMapper.answersList(id);
    }

    @Override
    public List<Answers> AnswersListAll(String userName,String answerContent) {
        return wodehuidaMapper.AnswersListAll(userName,answerContent);
    }

    @Override
    public int deleteAnswers(Integer id) {
        return wodehuidaMapper.deleteAnswers(id);
    }

    @Override
    public int addAnswers(Answers answers) {
        return wodehuidaMapper.addAnswers(answers);
    }

    @Override
    public List<Users> searchUserList() {
        return wodehuidaMapper.searchUserList();
    }

    @Override
    public int updateUserAndAnswer(Answers answers) {
        return wodehuidaMapper.updateUserAndAnswer(answers);
    }

    @Override
    public int updateUser(Users users) {
        return wodehuidaMapper.updateUser(users);
    }
}
